#set( $symbol_pound = '#' )
#set( $symbol_dollar = '$' )
#set( $symbol_escape = '\' )

package ${package}.${parentArtifactId}.libcommon.constant;

/**
 * 常用正则表达式
 */
public interface Regex {

    /**
     * 正则表达式：验证手机号
     */
    String PHONE = "^1[3,4,5,7,8]${symbol_escape}${symbol_escape}d{9}${symbol_dollar}";
    /**
     * 正则表达式：验证邮箱
     */
    String EMAIL = "^([a-z0-9A-Z]+[-|.]?)+[a-z0-9A-Z]@([a-z0-9A-Z]+(-[a-z0-9A-Z]+)?${symbol_escape}${symbol_escape}.)+[a-zA-Z]{2,}${symbol_dollar}";
    /**
     * 正则表达式：验证汉字
     */
    String CHINESE = "^[${symbol_escape}u4e00-${symbol_escape}u9fa5],*${symbol_dollar}";
    /**
     * 正则表达式：验证身份证
     */
    String ID_CARD = "(^${symbol_escape}${symbol_escape}d{18}${symbol_dollar})|(^${symbol_escape}${symbol_escape}d{15}${symbol_dollar})";
    /**
     * 正则表达式：验证URL
     */
    String URL = "http(s)?://([${symbol_escape}${symbol_escape}w-]+${symbol_escape}${symbol_escape}.)+[${symbol_escape}${symbol_escape}w-]+(/[${symbol_escape}${symbol_escape}w- ./?%&=]*)?";
    /**
     * 正则表达式：验证IP地址
     */
    String IP_ADDR = "(25[0-5]|2[0-4]${symbol_escape}${symbol_escape}d|[0-1]${symbol_escape}${symbol_escape}d{2}|[1-9]?${symbol_escape}${symbol_escape}d)";
    /**
     * 正则表达式：验证数字
     */
    String NUMBER = "[0-9]*";
    /**
     * 正则表达式：验证图片格式
     */
    String IMAGE = "(?i)(jpg|jpeg|png|gif)${symbol_dollar}";
}
